package com.fy.springcloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * 注意：如果在RestTemplate上面加了@LoadBalanced注解后，则restTemplate的访问地址一定要是服务名称，或者会报无法解析实例名的错误
 * http://localhost:18083/actuator/nacosdiscovery
 * nacos客户端在发起调用后，才会缓存负载实例的信息；在nacos宕机后，还可以正常调用服务端
 */
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class ConsumerApplication {

    public static void main(String[] args) {
        SpringApplication.run(ConsumerApplication.class, args);
    }
}
